<%@ page contentType="text/html;charset=utf-8" language="java" pageEncoding="utf-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<script type="text/javascript" charset="utf-8">
			function findBydeptcaption(){
				var deptcaption_value = document.getElementById('deptcaption_id').value;
				var findBydeptcaption_form = document.getElementById('findBydeptcaption_form');
				if(deptcaption_value == '请输入部门名称' || deptcaption_value == '') {
					alert('请先输入部门名称');
				}else {
					//alert(deptcaption_value);
					findBydeptcaption_form.action = 'findDeptByDeptcaption.action';
					findBydeptcaption_form.submit();
					//parent.frames['content'].location='findDeptByDeptcaption.action?deptcaption=' + deptcaption_value;
				}
			}	
			
			function checkValue(field){
				if(field.value == ''){
					field.value = '请输入部门名称';
				}
			}	
		</script>
		</head>
	<body bgcolor="#ccddee" link="#000066" vlink="#0066FF" alink="#99FF00">
		<table>
			<tr>
				<td width="50">
					<input type="button" value="添加顶级部门"
						onclick="parent.frames['content'].location='addDept.action?supdept=0'" />
				</td>
				<td width="50">
					<input type="button" value="查看部门列表" onclick="parent.frames['content'].location='listDept.action?deptcode=0'" />
				</td>
				<td width="100%" align="right">
					<form action="" id="findBydeptcaption_form" method="post" target="content">
					<input type="text" id="deptcaption_id" name="deptcaption" value="请输入部门名称" onclick="this.value=''" onblur="checkValue(this);">
					<input type="button" value="查找" onclick="findBydeptcaption()" />
					</form>
				</td>
			</tr>
		</table>
	</body>
</html>
